package com.jzy.stock.util;

public enum CurrencyTypeEnum {
    OUYUAN(2,"欧元"),MEIYUAN(1,"美元"),RENMINGBI(0,"人民币");
    private Integer id;
    private String name;

    CurrencyTypeEnum(Integer id, String name) {
        this.id = id;
        this.name = name;
    }

    public Integer getId() {
        return id;
    }

    public String getName() {
        return name;
    }
    public static String queryById(Integer id){
        for (CurrencyTypeEnum statusEnum : CurrencyTypeEnum.values()){
            if (id == statusEnum.getId()){
                return statusEnum.getName();
            }
        }
        return null;
    }
}
